package com.example.rvdemo.type;

import android.app.Activity;
import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.example.rvdemo.R;
import com.example.rvdemo.simple.RVSimpleAdaptar;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

public class MutTypeActivity extends Activity {
    private RecyclerView rv_type;
//    private List<String> datas;
    private RVTypeAdaptar rvSimpleAdaptar;
    private List<TypeBean> typeBeanList;
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.rv_type);
        rv_type = findViewById(R.id.rv_type);
//        datas = new ArrayList<>();
//        for (int i = 0; i < 50; i++) {
//            datas.add("I am itemView=="+i);
//        }
//        rvSimpleAdaptar = new RVTypeAdaptar(this,datas);
        jinritoutiao();
        rv_type.setLayoutManager(new LinearLayoutManager(this));
        rv_type.setAdapter(rvSimpleAdaptar);
    }

    private void jinritoutiao() {
        typeBeanList = new ArrayList<>();
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("0","我是第一种布局"));
        typeBeanList.add(new TypeBean("1","我是第2种布局","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg","https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1588620919,359805583&fm=26&gp=0.jpg","https://ss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=1020757406,2710278676&fm=26&gp=0.jpg"));
        typeBeanList.add(new TypeBean("2","我是广告","https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=1369511624,462595697&fm=26&gp=0.jpg"));
        rvSimpleAdaptar = new RVTypeAdaptar(this,typeBeanList);
    }
}
